package com.yang.consumer.feignclient;

import com.yang.common.dto.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author ：YangRan
 * @date ：Created in 2021/11/21 15:54
 * @description：openfeign客户端
 * @modified By：
 * @version: 1.0
 */
@Service
//注册中心中显示的微服务名称
@FeignClient(value = "provider-service")
public interface ProductClient {

    /**
     *
     * @param id
     * @return
     */
    @PostMapping("/provider/product/queryProduct/{id}")
    ResultVO queryProductById(@PathVariable(value = "id")Long id);
}
